/** When your routing table is too long, you can split it into small modules **/
import Layout from '@/layout';

// 路由模块化：活动管理中心路由
const SharedRoutes = [
  {
    hidden: true,
    path: '/shared',
    component: Layout,
    redirect: '/list',
    meta: {
      title: '分享管理',
      icon: 'tab'
    },
    children: [
      {
        path: 'list',
        name: 'SharedList',
        component: () => import('@/views/shared-management/shared-list/index'),
        meta: {
          title: '分享列表',
          icon: 'tab'
        }
      },
      {
        hidden: true,
        path: 'addStore',
        name: 'AddSharedStore',
        component: () => import('@/views/shared-management/shared-list/add'),
        meta: {
          title: '添加商品',
          icon: 'tab',
          activeMenu: '/shared/list',
          isNotCheckToken: true
        }
      },
      {
        path: 'sharers',
        name: 'SharedSharers',
        component: () => import('@/views/shared-management/shared-sharers/index'),
        meta: {
          title: '分享客管理',
          icon: 'tab'
        }
      },
      {
        hidden: true,
        path: 'sharersDetail',
        name: 'SharedSharersDetail',
        component: () => import('@/views/shared-management/shared-sharers/detail'),
        meta: {
          title: '分享客详情',
          icon: 'tab',
          activeMenu: '/shared/Sharers',
          isNotCheckToken: true
        }
      }
    ]
  },
  {
    hidden: true,
    path: '/sharedSetting',
    component: Layout,
    redirect: '/apply',
    meta: {
      title: '分享设置',
      icon: 'tab'
    },
    children: [
      {
        path: 'apply',
        name: 'SharedSettingApply',
        component: () => import('@/views/shared-management/shared-setting/apply'),
        meta: {
          title: '申请设置',
          icon: 'tab',
          isNotCheckToken: true
        }
      },
      {
        path: 'commission',
        name: 'SharedSettingCommission',
        component: () => import('@/views/shared-management/shared-setting/commission'),
        meta: {
          title: '分佣设置',
          icon: 'tab'
        }
      }
    ]
  }
];

export default SharedRoutes;
